import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-service',
  templateUrl: './service.component.html',
  styleUrls: ['./service.component.scss']
})
export class ProductServiceComponent implements OnInit {

  public accountList = [];

  public listCount = 10;

  public operate = "edit";

  constructor() { }

  ngOnInit() {
    this.accountList = [];
    for (var i = 1; i <= this.listCount; i++) {
      var username = ['易方达平稳增长混合', '易方达科汇灵活配置混合', '五矿投资', '广日集团', '杭联农银行', '南方电网'];
      var types = ['年金','养老金','社保'];
      var weekly = ['每周一', '无', '每周三'];
      var monthly = ['5工作日', '无'];
      var Quarterly = ['15工作日', '无'];
      var yearly = ['3个月内', '30个工作日'];
      var ramdom = Math.round(Math.random() * 2);
      this.accountList.push({
        code: '111111' + i,
        name: '产品名称' + i,
        fundDate: "2017-06-01",
        type: types[ramdom],
        money: '10000' + i,
        username: username[ramdom],
        weekly: weekly[ramdom],
        monthly: monthly[ramdom],
        Quarterly: Quarterly[ramdom],
        yearly: yearly[ramdom]
      });
    }
  }

}
